Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return longest text after failing to detect text longer than the configured value #423

Merged
merged 9 commits into from
Feb 27, 2018
Merged

Return longest text after failing to detect text longer than the configured value #423

merged 9 commits into from
Feb 27, 2018

Conversation

andreskrey
Copy link
Contributor

Second attempt at #381. Original PR was #421.

WIP. Will notify once test case is done.

@andreskrey andreskrey changed the title [WIP] Return longest text after failing to detect text longer than the configured value Return longest text after failing to detect text longer than the configured value Feb 26, 2018
@andreskrey
Copy link
Contributor Author

@gijsk Ready!

Copy link
Contributor

@gijsk gijsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one minor nit, with that this looks good. Thanks!

Readability.js Outdated
});

// But first check if we actually have something
if (this._attempts[0].textLength === 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make this just if (!this._attempts[0].textLength) ?

@andreskrey
Copy link
Contributor Author

Done!

Readability.js Outdated
@@ -1112,7 +1112,7 @@ Readability.prototype = {
});

// But first check if we actually have something
if (this._attempts[0].textLength === 0) {
if (this._attempts[0].textLength) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You missed out the !, which unfortunately is quite important...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I would just fix this myself and land manually, but I'm afraid my github fu is really weak and I'm in the middle of something else right now)

@andreskrey
Copy link
Contributor Author

Bah! that's what happens when you try to fix a review quickly before lunch :F

@gijsk gijsk merged commit 834672e into mozilla:master Feb 27, 2018
@andreskrey andreskrey deleted the issue-381-try-to-return-text-after-all-attempts-failed branch February 27, 2018 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants